/**
 * @author：dengdengpeiyi
 * @date：2024/12/1 09:00
 * @slogan: 苦心人，天不负，卧薪尝胆，三千越甲可吞吴
 * @verison 1.0
 * @description:
 */
public class Algorithm {
    public void swap(int[] arr, int i, int j) {
        int temp = arr[i];
        arr[i] = arr[j];
        arr[j] = temp;
    }

    public void bubbleSort(int[] arr, int len) {
        for (int i = 0; i < len - 1; i++) {
            for (int j = 0; j < len - i - 1; j++) {
                if (arr[j] > arr[j + 1]) {
                    swap(arr, j, j + 1);
                }
            }
        }
    }

    public void selectionSort(int[] arr, int len) {

    }
}
